<?php
	$compHtml ="";
	if ($this->label["value"] != ""){
		//create input text with label
		$labelOpt = $this->label["htmlOptions"];
		$compHtml ="<label $labelOpt>" .$this->label["value"] ."</label>";
	}	
	$val = Yii::app()->request->getParam($this->name,$this->value);	
	$compHtml .= "<select type='text' name='$this->name' id='$this->name' $this->htmlOptions>";
	foreach($this->options as $option){
		if ($option["selected"]){
			$compHtml .= "<option value='$option[value]' selected>$option[label]</option>";
		}else{
			$compHtml .= "<option value='$option[value]'>$option[label]</option>";
		}
	}
	$compHtml .= "</select>";	
	echo $compHtml;
?>

